from django.conf.urls import patterns, url, include
from rest_framework.urlpatterns import format_suffix_patterns
from api import views

urlpatterns = patterns('',
    #Image
    url(r'^image/upload/$', 'api.views.upload_file'),

    #Excursion
    url(r'^excursion/$', views.ExcursionList.as_view()),
    url(r'^excursion/(?P<pk>[0-9]+)/$', views.ExcursionInstance.as_view()),
    
    #Outcrop
    url(r'^outcrop/$', views.OutcropList.as_view()),

    #Authentication
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    url(r'^api-token-auth/$', 'rest_framework.authtoken.views.obtain_auth_token'),
    
    #Home
    url(r'^$', 'api.views.api_root')
)

urlpatterns = format_suffix_patterns(urlpatterns)